<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.pojo.OUser,java.util.List,java.util.Map"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd 

">
<%
	OUser user = (OUser) request.getAttribute("user");
	List<Map> list = (List<Map>) request.getAttribute("list");
	String list1 = (String) request.getAttribute("list1");
%>
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>个人信息</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" type="text/css" href="Assets/css/reset.css" />
<script type="text/javascript" src="Assets/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="Assets/js/js_z.js"></script>
<script
	src="<%=basePath%>bower_components/datatables/media/js/jquery.dataTables.min.js"></script>
<script src="<%=basePath%>bower_components/jquery/dist/jquery.min.js"></script>

<link rel="stylesheet" type="text/css" href="Assets/css/thems.css">
<script>

	var list1 =<%=list1%>;
	$(document).ready(function() {
		getgoodnum();
	});

	
	function getgoodnum() {
		var goods = $("#select1").find("option:selected").text();
		var UserID = '<%=user.getUserID()%>';
		$.ajax({
			type : 'get',
			url : 'getgoodnum.html',
			data:{'goods':goods,'UserID':UserID},
			success : function(data) {
				var html="";
				$('#yuliang').html(data);
			}
		});
	}
	


	/* function fun2() {
		var uuu = document.getElementById("refresh").value
		window.location.href = 'refresh.html?UserID=' + uuu;
	} */
	function fun2() {
		//	alert(JSON.stringify(info));
		var uuu = document.getElementById("refresh").value
		var info = {
			UserID : ""
		};
		info.UserID = uuu;

		$.ajax({
			type : 'get',
			url : 'refresh.html?UserID=' + uuu,
			data : info,
			success : function(data) {
				var subject = JSON.parse(data);

				$('.lijifen').html(subject.lijifen);
				console.log(subject.lijifen);
				$('.lijifenbao').html(subject.lijifenbao);
			}
		});
	}
	
	
	function fun4(){
		fun2();
		fun3();
	}
	//获取商品余量
	function goodsChange(){
		var goods = $("#select1").find("option:selected").text();
		var UserID = '<%=user.getUserID()%>';
		$.ajax({
			type : 'get',
			data:{'goods':goods,'UserID':UserID},
			url : 'getgoodnum.html',
			success : function(data) {
				var html="";
				$('#yuliang').html(data);
			}
		});
	}
</script>
</head>
<body>
	<%

	%>
	<div class="h_top">
		<div class="h_top_m">
			欢迎来到商品交易大厅网 <span> 欢迎回来会员<%=user.getUserID()%> <a
				href="logout.html?">安全退出</a>
			</span>
		</div>
	</div>
	<!--顶部-->
	<!--头部-->
	<div class="header clearfix">
		<div class="logo">
			<a href="<%=basePath%>index.html"><img src="Assets/images/logo.png" alt="网" /></a>
		</div>
		<div class="tel">
			<!--img src="Assets/images/tel.png" alt="400-168-0000"-->
		</div>
	</div>
	<div class="nav_bg">
		<ul class="nav clearfix">
			<li><a href="main.html">首页</a></li>
			<li><a href="bypt.html">商品交易</a></li>
			<li class="now"><a href="member.html">我的账户</a></li>
		</ul>
	</div>
	<div class="space_hx">&nbsp;</div>
	<div class="second clearfix">
		<div class="scd_l">
			<ul class="sidenav">

				<li class="now"><a href="member.html">个人信息</a></li>
				<li><a href="selectwtdprice.html?goods=宝石">商品挂单</a></li>
				<li><a href="selllist.html?page=1&last=5">售出记录</a></li>
				<li><a href="buylist.html?page=1&last=5">购买记录</a></li>
				<li><a href="gr_money.html?page=1&last=5">交易明细</a></li>
				<li><a href="tixian.html">提现明细</a></li>
				<li><a href="chongzhi.html">充值明细</a></li>
				<!-- <li><a href="tiqu.html">钱包管理</a></li> -->

			</ul>
			<div class="space_hx">&nbsp;</div>
		</div>
		<div class="scd_r">
			<div class="ucenter">
				<div class="box">
					<div class="box_h">
						<img src="Assets/images/icon10.png" alt="" /> <span class="red">个人信息</span>
					</div>
					<div class="box_m">
						<ul class="grxx">
							<li class="clearfix"><span class="title">会员编号*</span>
								<div class="li_r">
									<%=user.getUserID()%>
								</div></li>
							
							<li class="clearfix"><span class="title">消费币*</span>
								<div class="li_r">
									<%=user.getConsumezh().toString()%>
								</div>
								<div class="li_r">元</div></li>
							<li class="clearfix"><span class="title">复投*</span>
								<div class="li_r">
									<%=user.getRecast().toString()%>
								</div>
								<div class="li_r">元</div></li>

							<li class="clearfix "><span class="title">积分*</span>
								<div class="li_r lijifen">
									<%=user.getEncash().toString()%>
								</div>
								<div class="li_r">分</div></li>
							<li class="clearfix "><span class="title">商品存量*</span>
								<div class="li_r lijifenbao" >
								<select name="sp" id="select1" onchange="goodsChange()">
									<%
							for (int i =0;i<list.size();i++) {
								Map mmp = (Map)list.get(i);
								String selected = "";
								
								/* if (knowledgepoint.equals(ob.getType())) {
									selected = "selected='selected'";
								} */
						%>
						<option <%=selected%>><%=mmp.get("classname")%></option>
						<%
							}
						%> 
							</select>&nbsp&nbsp
								<span id="yuliang"></span>(可用数量)
									</div>
								<div class="li_r"></div> 
								<input type="hidden" id="refresh" value="<%=user.getUserID()%>"></input>
							</li>
							
						</ul>
					</div>
				</div>
			</div>
		</div>
	</div>
<div class="space_hx">&nbsp;</div>
 <div class="space_hx">&nbsp;</div>
<div class="f_nav_bg">
	<dl class="f_nav clearfix">
    	<dt><img src="Assets/images/tel.png"  /></dt>
        <dd>
            <div class="tip" style="float:left; width:200px;">
            <span style="font-size:16px;">团队</span>
			<li>太原金属企业站</li> <li> 太原金属商城</li>  <li>太原金属会员网</li> 	 
            </div>
            
         <div class="tip" style="float:left; width:200px;">
            <span style="font-size:16px;">服务帮助</span>
			 
 <li><a href="news.html?classid=4">为什么选择我们</a></li>
 
 <li><a href="news.html?classid=3">网站声明</a></li>
 
 <li><a href="news.html?classid=2">公司公告</a></li>
 
 <li><a href="news.html?classid=1">行业动态</a></li>
  	 
            </div>
		  
           <div class="tip">
            <p> 交易大厅</p>
<p>&nbsp;</p>   	 
            </div>  
   
           
            
        </dd>
    </dl>  <div class="copyriht">
    	版权解释权归太原金属所有    
    </div></div>

</body>
</html>
